// part1:C06:ex6.12.cpp
// swap two intergers.
#include <iostream>

void swap2(int &v1, int &v2) {
  int tmp = v1;
  v1 = v2;
  v2 = tmp;
}

int main(void) {
  using namespace std;
  int a = 5, b = 10;
  cout << "before a = " << a << " b = " << b << endl;
  swap2(a, b);
  cout << "after a = " << a << " b = " << b << endl;

  return 0;
}
